{% extends "wltheme/accounts/account_form.html" %}
{% load wenlincms_tags wlcore_tags %}

{% block title %}登录{% endblock %}

{% block body_id %}account{% endblock %}

{% block breadcrumb_menu %}{% endblock %}

{% block wlmain %}class="wlmain log_maincontain"{% endblock %}

{% block main %}
    <div class="log_content">
        <div class="am-fl log_showfourmes">
            <div class="am-fl log_mes log_mesone">
                <i class="am-icon-btn am-primary am-icon-hdd-o am-fl log_icons"></i>
                <dl>千万级企业资源库</dl>
                <p>多维度产业数据，洞察企业全景<br>多层级数据采集，挖掘信息深度价值
                </p>
            </div>
            <div class="am-fl log_mes log_mestwo">
                <i class="am-icon-btn am-warning am-icon-steam am-fl log_icons"></i>
                <dl>需求智能匹配系统</dl>
                <p>智能产业链标签，供需精准、主动推送<br>准确定位用户个性化需求
                </p>
            </div>
            <div class="am-fl log_mes log_mesthree">
                <i class="am-icon-btn am-danger am-icon-users am-fl log_icons"></i>
                <dl>大数据人脉对接分析</dl>
                <p>基于大数据构建人脉网络<br>商务语境下的产业服务社交平台
                </p>
            </div>
            <div class="am-fl log_mes log_mesfour">
                <i class="am-icon-btn am-success am-icon-shield am-fl log_icons"></i>
                <dl>企业真实业务认证</dl>
                <p>确保供需真实有效<br>承担安全监管职责，避免商业欺诈行为
                </p>
            </div>
        </div>

        <div class="am-fr am-panel am-panel-bd log-container">
            <div id="login_container"></div>
            <form class="am-form am-form-horizontal log-form" id="login" method="post" {% if form.is_multipart %}
                  enctype="multipart/form-data"{% endif %}>
                {% csrf_token %}
                <div class="am-input-group log_inpmes">
                <span class="am-input-group-label"><i
                        class="am-icon-user am-icon-sm am-icon-fw log_unameicon"></i></span>
                    <input type="text" name="username" class="am-form-field" placeholder="请输入您的账号" required="true">
                </div>
                <div class="log_errors log_usnerror">
                </div>
                <div class="am-input-group log_inpmes">
                    <span class="am-input-group-label"><i
                            class="am-icon-lock am-icon-sm am-icon-fw log_upswicon"></i></span>
                    <input type="password" name="password" class="am-form-field" placeholder="请输入您的密码" required="true">
                </div>
                <div class="log_errors log_pswerror">
                    {% if form.non_field_errors %}
                        {{ form.non_field_errors }}
                    {% endif %}
                </div>
                <div class="log_forgetpsw">
                    <a href="/accounts/password/reset/"
                       class="am-btn am-btn-link am-fr">忘记密码？</a>
                </div>
                <div class="am-form-group log_enterlog">
                    {% block account_form_actions %}
                        <button type="submit" class="am-btn am-btn-primary">{{ title }}</button>
                    {% endblock %}
                </div>
                <div class="am-form-group log-others">
                    <span class="log_leadregiste">还没有账号？&nbsp;<a href="/accounts/signup/">注册</a></span>
                    <label class="log-others-label">第三方登陆：</label>
                    <a class="am-icon-btn am-success am-icon-weixin log-others-btn"
                       id="login_qq" style="cursor: pointer"></a>
                    <a href="/weiboSignin/" class="am-icon-btn am-danger am-icon-weibo log-others-btn"
                       id="log_weibo"></a>
                </div>
            </form>
        </div>
    </div>
{% endblock %}

{% block js %}
    <script type="text/javascript">
        var lc = $(".log_content");
        lc.parent().parent().parent().addClass("log_bgcolor").attr("id", "log_bgcolor");
        lc.parent().addClass("log_formmes");
        //第三方微信登录
        //微信官方js开始
        !function (a, b) {
            function d(a) {
                var e, c = b.createElement("iframe"), d = "http://open.weixin.qq.com/connect/qrconnect?appid=" + a.appid + "&scope=" + a.scope + "&redirect_uri=" + a.redirect_uri + "&state=" + a.state + "&login_type=jssdk";
                d += a.style ? "&style=" + a.style : "", d += a.href ? "&href=" + a.href : "", c.src = d, c.frameBorder = "0", c.allowTransparency = "true", c.scrolling = "no", c.width = "345px", c.height = "345px",
                        c.name = "wechatfr", c.id = "wechatfr", e = b.getElementById(a.id), e.innerHTML = "", e.appendChild(c)
            }

            a.WxLogin = d
        }(window, document);
        //微信官方js结束
        var obj = new WxLogin({
            id: "login_container",
            appid: "wx80286e78b3ed448a",
            scope: "snsapi_login",
            redirect_uri: "http%3a%2f%2fzhidaoii.com%2fwxcallback",
            state: "",
            style: "",
            href: "http%3a%2f%2fzhidaoii.com%2fstatic%2fcss%2fwechatqrcode2.css"
        });
        $("#login_qq").click(function () {
            $("#login_container").show();
        });
        $("#login_container").mouseout(function () {
            $(this).hide();
        });
    </script>
    <script src="{{ STATIC_URL }}{{ "wltheme/js/jquery.validate.js"|file_time_stamp }}"></script>
    <script src="{{ STATIC_URL }}{{ "wltheme/js/account/sina.js"|file_time_stamp }}" type="text/javascript"
            charset="utf-8"></script>
{% endblock %}
